package com.winning.pmph.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.persistence.Table;
import java.util.List;

@Table(name = "MEDICAL_CALCULATOR")
@Data
public class MedicalCalculator extends BaseEntity {
    /**
     * 计算器库name
     */
    public final static String CALCULATOR_LIB_NAME = "计算器库";
    /**
     * 计算器库字段, content字段id
     */
    public final static String CALCULATOR_LIB_FIELD_ID_CONTENT = "field_content";
    /**
     * 计算器库字段, content字段名称
     */
    public final static String CALCULATOR_LIB_FIELD_NAME_CONTENT = "计算器页面文件";

    /**
     * 类型--计算型
     */
    public final static String COMPUTATIONAL = "1";
    /**
     * 类型--评分型
     */
    public final static String DECIDE = "2";
    /**
     * 类型--描述型
     */
    public final static String DESCRIPTIVE = "3";

    /**
     * 未提交
     */
    public final static Integer UN_COMMIT = 0;
    /**
     * 已提交未审核
     */
    public final static Integer COMMIT = 1;
    /**
     * 审核通过
     */
    public final static Integer PASS = 2;
    /**
     * 审核未通过
     */
    public final static Integer REJECT = 3;
    /**
     * 已发布
     */
    public final static Integer RELEASE = 4;
    /**
     * 添加成功标志
     */
    public final static Integer SUCCESS = 1;

    @TableId
    private String id;

    /**
     * 医学公式名称
     */
    private String formulaName;

    /**
     * 版本号
     */
    private int version;

    /**
     * 描述
     */
    @TableField("`describe`")
    private String describe;

    /**
     * 公式类型 0 计算型  1  评分型，2 描述型
     */
    private int formulaType;

    /**
     * 驳回原因
     */
    private String rejectReason;

    @TableField(exist = false)
    private String tagName;
    @TableField(exist = false)
    private String tagId;
    @TableField(exist = false)
    private String property;
    @TableField(exist = false)
    private List<MedicalCalculatorField> medicalCalculatorFieldList;
    @TableField(exist = false)
    private String editor;
    @TableField(exist = false)
    private List<String> auditorList;
}
